package com.sxt.springcloud.bus.fallback;

import com.sxt.springcloud.bus.GoodstypeClientService;
import com.sxt.sys.common.DataGridView;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class GoodstypeClientFallbackService implements FallbackFactory {
    @Override
    public Object create(Throwable throwable) {
        return new GoodstypeClientService() {
            @Override
            public DataGridView loadAllGoodstype() {
                return new DataGridView("服务降级，服务器忙，请稍后重试！调用查询所有商品类型方法失败");
            }
        };
    }
}
